<form method="post" action="{:U('/Home/TaskManage/add')}" id="addFrom">
    <div class="ta_xx">&nbsp;</div>
    <div class="rw_tit"><span>添加任务</span></div>
    <div class="tadd">
        <div class="h">
            <p class="p1">{:L('_LOCATION')}</p>

            <p class="p2">
                {$task.mall.name} {$task.floor.name} {$task.brand.name}
            </p>

            <div class="clear"></div>
        </div>
        <notempty name="phones">
            <div class="h">
                <p class="p1">{:L('_PHONE')}</p>

                <p class="p2">
                    <foreach item="phone" name="phones">
                        {$phone.name} : {$phone.phone}（{$phone.remark}）<br/>
                    </foreach>
                </p>
                <div class="clear"></div>
            </div>
        </notempty>
        <div class="h">
            <p class="p1">{:L('_TITLE')}</p>

            <p class="p2">
                <input type="text" maxlength="20" name="title" class="yanz"/>
            </p>
            <span class="must">*</span>

            <div class="clear"></div>
        </div>
        <div class="h">
            <p class="p1">{:L('_KEYWORD')}</p>

            <p class="p2">
                <input type="radio" name="keyword" value="优惠促销" checked="checked"/>优惠促销
                <input type="radio" name="keyword" value="新品上市"/>新品上市
            </p>
            <span class="must">*</span>

            <div class="clear"></div>
        </div>
        <div class="h">
            <p class="p1">{:L('_START_TIME')}</p>

            <p class="p2">
                <input type="text" readonly="readonly" name="start_time"
                       id="start_time" class="yanz"/>
            </p>
            <span class="must">*</span>

            <div class="clear"></div>
        </div>
        <div class="h">
            <p class="p1">{:L('_END_TIME')}</p>

            <p class="p2">
                <input type="text" readonly="readonly" name="end_time" id="end_time"
                       class="yanz"/>
            </p>
            <span class="must">*</span>

            <div class="clear"></div>
        </div>
        <div class="h">
            <p class="p1">{:L('_CONTENT')}</p>

            <p class="p2">
                <textarea name="content" class="nr" rows="5" cols="30"></textarea>
            </p>

            <div class="clear"></div>
        </div>
        <div class="h">
            <p class="p1">{:L('_REMARK')}</p>

            <p class="p2">
                <textarea name="remark" class="nr" rows="5" cols="30"></textarea>
            </p>

            <div class="clear"></div>
        </div>
        <div class="h">
            <p class="p1">&nbsp;</p>

            <p class="p3">
                <input type="submit" value="" class="add_rw"/>
                <input type="hidden" name="mid" value="{$mid}">
                <input type="hidden" name="fid" value="{$fid}">
                <input type="hidden" name="bid" value="{$bid}">
            </p>
        </div>
</form>
<script type="text/javascript">
    $(function () {
        $("#start_time").datepicker({
            changeMonth:true,
            changeYear:true,
            dateFormat:"yy-mm-dd"
        });
        $("#end_time").datepicker({
            changeMonth:true,
            changeYear:true,
            dateFormat:"yy-mm-dd"
        });
        $('#addFrom').ajaxForm({
            dataType:'json',
            success:processJson
        });
        function processJson(data) {
            if (data.status) {
                $("#task").html("");
                alert(data.data);
            } else {
                alert(data.info);
            }
        }
    });
</script>